package com.alibaba.algo.components.edas;

import com.alibaba.nacos.api.config.annotation.NacosValue;
import com.alibaba.nacos.spring.context.annotation.config.NacosPropertySource;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by IntelliJ IDEA.
 * User: glorysongglory
 * Date: 2020/11/4
 * Time: 10:33
 */
@Component
@RequestMapping("/config/")
public class EDAS {

    @NacosValue(value = "${ab.cd:no property}", autoRefreshed = true)
    private String dataSourceType;

    @GetMapping(value = "/getDataSourceType")
    @ResponseBody
    public String get() {
        return dataSourceType;
//        return "test";
    }
}
